<?xml version="1.0" encoding="utf-8" ?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:iepd="http://dps.state.tx.us/niem/exchange/OfenseReport/1.0" xmlns:tx="http://dps.state.tx.us/niem/extensions/1.0" xmlns:j="http://niem.gov/niem/domains/jxdm/4.0" xmlns:scr="http://niem.gov/niem/domains/screening/2.0" xmlns:s="http://niem.gov/niem/structures/2.0" xmlns:ansi-nist="http://niem.gov/niem/ansi-nist/2.0" xmlns:nc="http://niem.gov/niem/niem-core/2.0">
	
<xsl:import href="TXCommon.xslt"/>
<xsl:output method="text" encoding="UTF-8"/>
<!--
		<xsl:value-of select="//"/>
-->
	<xsl:template match="/">
		<xsl:text>                                           OFFENSE/INCIDENT REPORT</xsl:text>
		<xsl:text>&#10;                                                                      CASE NUMBER: </xsl:text>
		<xsl:text>&#10;                                                                      </xsl:text>
		<xsl:value-of select="//tx:ReportingAgencyRecordIdentification/nc:IdentificationID"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;                                                  OFFENSE SECTION: </xsl:text>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:apply-templates select="//tx:Offense">
			<xsl:with-param name="HowReported">
				<xsl:value-of select="//j:IncidentServiceCall/j:ServiceCallMechanismText"/>
			</xsl:with-param>
		</xsl:apply-templates>
<!--
		<xsl:text>&#10;OFFENSE:                                                    </xsl:text> 
		<xsl:text>HOW REPORTED:       </xsl:text>
		<xsl:text>CODE:               </xsl:text>
		<xsl:text>SEVERITY: </xsl:text>
		<xsl:text>&#10;</xsl:text> 
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:Offense/j:ChargeDescriptionText"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="20"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//j:IncidentServiceCall/j:ServiceCallMechanismText"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="20"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:Offense/j:ChargeStatute/j:StatuteCodeSectionIdentification/nc:IdentificationID"/>
				<xsl:text> </xsl:text>
				<xsl:value-of select="//tx:Offense/j:ChargeStatute/j:StatuteCodeIdentification/nc:IdentificationID"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:value-of select="//tx:Offense/j:ChargeSeverityText"/>

-->		
		<xsl:text>&#10;DATE OFFENSE REPORTED:        </xsl:text>
		<xsl:text>TIME OFFENSE REPORTED:        </xsl:text>
		<xsl:text>FBI CODE:                     </xsl:text>
		<xsl:text>UCR CODE:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="30"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="//tx:Incident">	
					<xsl:with-param name="dataElem">REPORTDATE</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="30"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="//tx:Incident">	
					<xsl:with-param name="dataElem">REPORTTIME</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="30"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:Offense/j:ChargeNCICCode"/>
				<xsl:value-of select="//tx:Offense/tx:ChargeAugmentation/tx:ChargeNCICTexasSuffixCode"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:value-of select="//tx:Offense/j:ChargeUCRCode"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;LOCATION OF OFFENSE: </xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:apply-templates select="//tx:Incident">	
			<xsl:with-param name="dataElem">ADDRESS</xsl:with-param>
		</xsl:apply-templates>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;SECTOR:                                 </xsl:text>
		<xsl:text>                                        </xsl:text>
		<xsl:text>OTHER INDICATORS: </xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="40"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="//tx:Incident">	
					<xsl:with-param name="dataElem">SECTOR</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:apply-templates select="//tx:OtherIndication"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;                                                  VICTIM/WITNESS SECTION</xsl:text>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:apply-templates select="//tx:IncidentComplainant"/>
		<xsl:apply-templates select="//j:IncidentVictim"/>
		<xsl:apply-templates select="//j:IncidentWitness"/>

		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;                                                   OFFICER/ACTION SECTION</xsl:text>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;DIVISION NOTIFIED:  </xsl:text>
		<xsl:text>DATE:               </xsl:text>
		<xsl:text>TIME:               </xsl:text>
		<xsl:text>DIVISION INVESTIGATOR: </xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="20"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:LawEnforcementAgency/nc:OrganizationName"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="20"/>
			<xsl:with-param name="data">
				<xsl:call-template name="FormatDate">
					<xsl:with-param name="FullDate">
						<xsl:value-of select="substring-before(//tx:InvestigatorDivisionNotifiedDateTime/nc:DateTime,'T')"/>
					</xsl:with-param>
				</xsl:call-template>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="20"/>
			<xsl:with-param name="data">
				<xsl:value-of select="substring-after(//tx:InvestigatorDivisionNotifiedDateTime/nc:DateTime,'T')"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:apply-templates select="//tx:IncidentInvestigatorOfficial/nc:RoleOfPersonReference">
			<xsl:with-param name="dataElem">NAME</xsl:with-param>
		</xsl:apply-templates>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;PHOTOGRAPH TAKEN:   </xsl:text>
		<xsl:text>DATE TAKEN:         </xsl:text>
		<xsl:text>PHOTOGRAPHER:                 </xsl:text>
		<xsl:text>EVIDENCE CONTROL OFFICER: </xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="20"/>
			<xsl:with-param name="data">
				<xsl:if test="//tx:Image/nc:BinaryAvailableIndicator='true'">Y</xsl:if>
				<xsl:if test="//tx:Image/nc:BinaryAvailableIndicator='false'">N</xsl:if>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="20"/>
			<xsl:with-param name="data">
				<xsl:call-template name="FormatDate">
					<xsl:with-param name="FullDate">
						<xsl:value-of select="substring-before(//tx:Image/nc:BinaryCaptureDate/nc:DateTime,'T')"/>
					</xsl:with-param>
				</xsl:call-template>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="30"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="//tx:Image/tx:ImageAugmentation/tx:ImageOperatorOfficial/nc:RoleOfPersonReference">
						<xsl:with-param name="dataElem">NAME</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:apply-templates select="//tx:Incident/j:IncidentAugmentation/j:IncidentEvidence/j:EvidenceCustodyTransfer/j:CustodyTransferReceivingEnforcementOfficial/nc:RoleOfPersonReference">
				<xsl:with-param name="dataElem">NAME</xsl:with-param>
		</xsl:apply-templates>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;DISPOSITION OF EVIDENCE: </xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:value-of select="//tx:Incident/j:IncidentAugmentation/j:IncidentEvidence/j:EvidenceCustodyTransfer/j:CustodyTransferActionText"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;TIME DISPATCHED:                        </xsl:text>
		<xsl:text>TIME 10-23:                             </xsl:text>
		<xsl:text>TIME 10-5: </xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="40"/>
			<xsl:with-param name="data">
				<xsl:value-of select="substring-after(//tx:Incident/j:IncidentAugmentation/j:IncidentServiceCall/j:ServiceCallDispatchedDate/nc:DateTime,'T')"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="40"/>
			<xsl:with-param name="data">
				<xsl:value-of select="substring-after(//tx:Incident/j:IncidentAugmentation/j:IncidentServiceCall/j:ServiceCallArrivedDate/nc:DateTime,'T')"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:value-of select="substring-after(//tx:Incident/j:IncidentAugmentation/j:IncidentServiceCall/j:ServiceCallClearedDate/nc:DateTime,'T')"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;REPORTING OFFICER:            </xsl:text>
		<xsl:text>EMP #          </xsl:text>
		<xsl:text>DIVISION:      </xsl:text>
		<xsl:text>PARTNER:                      </xsl:text>
		<xsl:text>EMP #          </xsl:text>
		<xsl:text>DIVISION:      </xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="30"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="//j:IncidentReportingOfficial/nc:RoleOfPersonReference">
						<xsl:with-param name="dataElem">NAME</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="15"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//j:IncidentReportingOfficial/j:EnforcementOfficialBadgeIdentification/nc:IdentificationID"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="15"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//j:IncidentReportingOfficial/j:EnforcementOfficialUnit/j:EnforcementUnitNumberIdentification/nc:IdentificationID"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="30"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="//j:IncidentAssistingOfficial/nc:RoleOfPersonReference">
						<xsl:with-param name="dataElem">NAME</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="15"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//j:IncidentAssistingOfficial/j:EnforcementOfficialBadgeIdentification/nc:IdentificationID"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:value-of select="//j:IncidentAssistingOfficial/j:EnforcementOfficialUnit/j:EnforcementUnitNumberIdentification/nc:IdentificationID"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;APPROVED BY:                  </xsl:text>
		<xsl:text>EMP #                         </xsl:text>
		<xsl:text>DIVISION: </xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="30"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="//tx:DocumentApproverOfficial/nc:RoleOfPersonReference">
						<xsl:with-param name="dataElem">NAME</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="30"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:DocumentApproverOfficial/j:EnforcementOfficialBadgeIdentification/nc:IdentificationID"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:value-of select="//tx:DocumentApproverOfficial/j:EnforcementOfficialUnit/j:EnforcementUnitNumberIdentification/nc:IdentificationID"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;NARATIVE SUMMARY: </xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:value-of select="//tx:IncidentReportedNarrative/nc:DocumentSummaryText"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;DETAILS: </xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:value-of select="//tx:IncidentReportedNarrative/tx:IncidentDetailsText"/>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;</xsl:text>
	</xsl:template>
	
	<xsl:template match="tx:Offense">
		<xsl:param name="HowReported"/>
		<xsl:text>&#10;OFFENSE:                                                    </xsl:text> 
		<xsl:text>HOW REPORTED:       </xsl:text>
		<xsl:text>CODE:               </xsl:text>
		<xsl:text>SEVERITY: </xsl:text>
		<xsl:text>&#10;</xsl:text> 
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:value-of select="./j:ChargeDescriptionText"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="20"/>
			<xsl:with-param name="data">
				<xsl:value-of select="$HowReported"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="20"/>
			<xsl:with-param name="data">
				<xsl:value-of select="./j:ChargeStatute/j:StatuteCodeSectionIdentification/nc:IdentificationID"/>
				<xsl:text> </xsl:text>
				<xsl:value-of select="./j:ChargeStatute/j:StatuteCodeIdentification/nc:IdentificationID"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:value-of select="./j:ChargeSeverityText"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
	</xsl:template>


	<xsl:template match="tx:OtherIndication">
		<xsl:if test="./tx:OtherIndicationIndicator='true'">
			<xsl:text>&#10;                                                                                </xsl:text>
			<xsl:value-of select="./tx:OtherIndicationName"/>
	</xsl:if>
	</xsl:template>

	
<xsl:template match="tx:Incident">
		<xsl:param name="dataElem"/>
		<xsl:variable name="IncidentRef">
			<xsl:value-of select="@s:id"/>
		</xsl:variable>
		<xsl:variable name="MetaRef">
			<xsl:value-of select="@s:metadata"/>
		</xsl:variable>
		<xsl:choose>
			<xsl:when test="$dataElem='ADDRESS'">
				<xsl:apply-templates select="//j:ActivityLocationAssociation">
					<xsl:with-param name="ActivityID">
						<xsl:value-of select="$IncidentRef"/>
					</xsl:with-param>
					<xsl:with-param name="dataElem">
						<xsl:value-of select="$dataElem"/>
					</xsl:with-param>
				</xsl:apply-templates>
			</xsl:when>
			<xsl:when test="$dataElem='SECTOR'">
				<xsl:apply-templates select="//j:ActivityLocationAssociation">
					<xsl:with-param name="ActivityID">
						<xsl:value-of select="$IncidentRef"/>
					</xsl:with-param>
					<xsl:with-param name="dataElem">
						<xsl:value-of select="$dataElem"/>
					</xsl:with-param>
				</xsl:apply-templates>
			</xsl:when>
			<xsl:when test="$dataElem='REPORTDATE'">
				<xsl:call-template name="FormatDate">
					<xsl:with-param name="FullDate">
						<xsl:value-of select="substring-before(//tx:Incident/nc:ActivityDate/nc:DateTime,'T')"/>
					</xsl:with-param>
				</xsl:call-template>
			</xsl:when>
			<xsl:when test="$dataElem='REPORTTIME'">
				<xsl:value-of select="substring-after(//tx:Incident/nc:ActivityDate/nc:DateTime,'T')"/>
			</xsl:when>
		</xsl:choose>
</xsl:template>

	<xsl:template match="j:ActivityLocationAssociation">
		<xsl:param name="ActivityID"/>
		<xsl:param name="dataElem"/>
		<xsl:variable name="ActivityRef">
			<xsl:value-of select="./nc:ActivityReference/@s:ref"/>
		</xsl:variable>
		<xsl:variable name="LocationRef">
			<xsl:value-of select="./nc:LocationReference/@s:ref"/>
		</xsl:variable>
		<xsl:if test="$ActivityRef=$ActivityID">
			<xsl:apply-templates select="//nc:Location">
				<xsl:with-param name="LocationRef">
					<xsl:value-of select="$LocationRef"/>
				</xsl:with-param>
					<xsl:with-param name="dataElem">
						<xsl:value-of select="$dataElem"/>
					</xsl:with-param>
			</xsl:apply-templates>
		</xsl:if>
	</xsl:template>
	
	<xsl:template match="nc:ResidenceAssociation">
		<xsl:param name="PersonID"/>
		<xsl:variable name="PersonRef">
			<xsl:value-of select="./nc:PersonReference/@s:ref"/>
		</xsl:variable>
		<xsl:variable name="LocationRef">
			<xsl:value-of select="./nc:LocationReference/@s:ref"/>
		</xsl:variable>
		<xsl:if test="$PersonRef=$PersonID">
			<xsl:apply-templates select="//nc:Location">
				<xsl:with-param name="LocationRef">
					<xsl:value-of select="$LocationRef"/>
				</xsl:with-param>
				<xsl:with-param name="dataElem">ADDRESS</xsl:with-param>
			</xsl:apply-templates>
		</xsl:if>
	</xsl:template>

	<xsl:template match="nc:PersonContactInformationAssociation">
		<xsl:param name="PersonID"/>
		<xsl:variable name="PersonRef">
			<xsl:value-of select="./nc:PersonReference/@s:ref"/>
		</xsl:variable>
		<xsl:variable name="ContactRef">
			<xsl:value-of select="./nc:ContactInformationReference/@s:ref"/>
		</xsl:variable>
		<xsl:if test="$PersonRef=$PersonID">
			<xsl:apply-templates select="//nc:LocationContactInformation">
				<xsl:with-param name="ContactRef">
					<xsl:value-of select="$ContactRef"/>
				</xsl:with-param>
			</xsl:apply-templates>
		</xsl:if>
	</xsl:template>

	<xsl:template match="tx:PersonCurrentEmploymentAssociation">
		<xsl:param name="PersonID"/>
		<xsl:param name="dataElem">ORGNAME</xsl:param>
		<xsl:variable name="PersonRef">
			<xsl:value-of select="./nc:EmployeeReference/@s:ref"/>
		</xsl:variable>
		<xsl:variable name="EmpRef">
			<xsl:value-of select="./nc:Employer/nc:EntityOrganizationReference/@s:ref"/>
		</xsl:variable>
		<xsl:variable name="LocRef">
			<xsl:value-of select="./nc:EmploymentLocationReference/@s:ref"/>
		</xsl:variable>
		<xsl:variable name="ContactRef">
			<xsl:value-of select="//nc:Location[@s:id=$LocRef]/nc:LocationContactInformation/@s:id"/>
		</xsl:variable>
		<xsl:if test="$PersonRef=$PersonID">
			<xsl:if test="$dataElem='ORGNAME'">
				<xsl:apply-templates select="//tx:EmployerOrganization">
					<xsl:with-param name="EmpRef">
						<xsl:value-of select="$EmpRef"/>
					</xsl:with-param>
				</xsl:apply-templates>
			</xsl:if>
			<xsl:if test="$dataElem='ADDRESS'">
				<xsl:apply-templates select="//nc:Location">
					<xsl:with-param name="LocationRef">
						<xsl:value-of select="$LocRef"/>
					</xsl:with-param>
				</xsl:apply-templates>
			</xsl:if>
			<xsl:if test="$dataElem='PHONE'">
				<xsl:apply-templates select="//nc:LocationContactInformation">
					<xsl:with-param name="ContactRef">
						<xsl:value-of select="$ContactRef"/>
					</xsl:with-param>
				</xsl:apply-templates>
			</xsl:if>
		</xsl:if>
	</xsl:template>


	<xsl:template match="tx:EmployerOrganization">
		<xsl:param name="EmpRef"/>
		<xsl:variable name="EmpID">
			<xsl:value-of select="@s:id"/>
		</xsl:variable>
		<xsl:if test="$EmpID=$EmpRef">
			<xsl:value-of select="./nc:OrganizationName"/>
		</xsl:if>
	</xsl:template>

	<xsl:template match="nc:Location">
		<xsl:param name="LocationRef"/>
		<xsl:param name="dataElem">ADDRESS</xsl:param>
		<xsl:variable name="Location">
			<xsl:value-of select="@s:id"/>
		</xsl:variable>
		<xsl:if test="$Location=$LocationRef">
			<xsl:if test="$dataElem='ADDRESS'">
				<xsl:value-of select="./nc:LocationAddress/nc:AddressFullText"/>
			</xsl:if>
			<xsl:if test="$dataElem='SECTOR'">
				<xsl:value-of select="./nc:LocationLocale/nc:LocalePoliceBeatText"/>
			</xsl:if>
		</xsl:if>
	</xsl:template>

	<xsl:template match="nc:LocationContactInformation">
		<xsl:param name="ContactRef"/>
		<xsl:variable name="Contact">
			<xsl:value-of select="@s:id"/>
		</xsl:variable>
		<xsl:if test="$Contact=$ContactRef">
			<xsl:call-template name="FormatPhone">
				<xsl:with-param name="FullPhoneNumber">
					<xsl:value-of select="./nc:ContactTelephoneNumber/nc:FullTelephoneNumber/nc:TelephoneNumberFullID"/>
				</xsl:with-param>
			</xsl:call-template>
			<xsl:if test="nc:ContactTelephoneNumber/nc:FullTelephoneNumber/nc:TelephoneSuffixID">
				<xsl:text> x</xsl:text>
				<xsl:value-of select="./nc:ContactTelephoneNumber/nc:FullTelephoneNumber/nc:TelephoneSuffixID"/>
			</xsl:if>
		</xsl:if>
	</xsl:template>

	<xsl:template match="j:IncidentVictim">
		<xsl:text>&#10;VICTIM NAME:                                                </xsl:text>
		<xsl:text>ADDRESS:                                </xsl:text>
		<xsl:text>RES PHONE: </xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
					<xsl:with-param name="dataElem">NAME</xsl:with-param>
			</xsl:apply-templates>
		</xsl:with-param>
	</xsl:call-template>
		
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="40"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
						<xsl:with-param name="dataElem">ADDRESS</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">PHONE</xsl:with-param>
		</xsl:apply-templates>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;DRIVER'S LICENSE:                                           </xsl:text>
		<xsl:text>SOCIAL SECURITY NUMBER: </xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
						<xsl:with-param name="dataElem">DLN</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">SSN</xsl:with-param>
		</xsl:apply-templates>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;DATE OF BIRTH:                </xsl:text>
		<xsl:text>SEX  </xsl:text>
		<xsl:text>RACE </xsl:text>
		<xsl:text>EYE  </xsl:text>
		<xsl:text>HGT  </xsl:text>
		<xsl:text>WGT  </xsl:text>
		<xsl:text>HAIR </xsl:text>
		<xsl:text>EMPLOYER/SCHOOL:                        </xsl:text>
		<xsl:text>BUSINESS PHONE: </xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="30"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">DOB</xsl:with-param>
		</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="5"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">SEX</xsl:with-param>
		</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="5"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">RACE</xsl:with-param>
		</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="5"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">EYE</xsl:with-param>
		</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="5"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">HGT</xsl:with-param>
		</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="5"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">WGT</xsl:with-param>
		</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="5"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">HAIR</xsl:with-param>
		</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="40"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">EMP</xsl:with-param>
		</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">BUSPHONE</xsl:with-param>
		</xsl:apply-templates>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;                                                            BUSINESS/SCHOOL ADDRESS: </xsl:text>
		<xsl:text>&#10;                                                            </xsl:text>
		<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">BUSADDR</xsl:with-param>
		</xsl:apply-templates>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
</xsl:template>
		
	<xsl:template match="j:IncidentWitness">
		<xsl:text>&#10;WITNESS NAME:                                               </xsl:text>
		<xsl:text>ADDRESS:                                </xsl:text>
		<xsl:text>RES PHONE: </xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
					<xsl:with-param name="dataElem">NAME</xsl:with-param>
			</xsl:apply-templates>
		</xsl:with-param>
	</xsl:call-template>
		
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="40"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
						<xsl:with-param name="dataElem">ADDRESS</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">PHONE</xsl:with-param>
		</xsl:apply-templates>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;DRIVER'S LICENSE:                                           </xsl:text>
		<xsl:text>SOCIAL SECURITY NUMBER: </xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
						<xsl:with-param name="dataElem">DLN</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">SSN</xsl:with-param>
		</xsl:apply-templates>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;DATE OF BIRTH:                </xsl:text>
		<xsl:text>SEX  </xsl:text>
		<xsl:text>RACE </xsl:text>
		<xsl:text>EYE  </xsl:text>
		<xsl:text>HGT  </xsl:text>
		<xsl:text>WGT  </xsl:text>
		<xsl:text>HAIR </xsl:text>
		<xsl:text>EMPLOYER/SCHOOL:                        </xsl:text>
		<xsl:text>BUSINESS PHONE: </xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="30"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">DOB</xsl:with-param>
		</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="5"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">SEX</xsl:with-param>
		</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="5"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">RACE</xsl:with-param>
		</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="5"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">EYE</xsl:with-param>
		</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="5"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">HGT</xsl:with-param>
		</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="5"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">WGT</xsl:with-param>
		</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="5"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">HAIR</xsl:with-param>
		</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="40"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">EMP</xsl:with-param>
		</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">BUSPHONE</xsl:with-param>
		</xsl:apply-templates>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;                                                            BUSINESS/SCHOOL ADDRESS: </xsl:text>
		<xsl:text>&#10;                                                            </xsl:text>
		<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">BUSADDR</xsl:with-param>
		</xsl:apply-templates>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
	</xsl:template>
	
<xsl:template match="tx:IncidentComplainant">
		<xsl:text>&#10;REPORTING PERSON:                                           </xsl:text>
		<xsl:text>ADDRESS:                                </xsl:text>
		<xsl:text>RES PHONE: </xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
					<xsl:with-param name="dataElem">NAME</xsl:with-param>
			</xsl:apply-templates>
		</xsl:with-param>
	</xsl:call-template>
		
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="40"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
						<xsl:with-param name="dataElem">ADDRESS</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">PHONE</xsl:with-param>
		</xsl:apply-templates>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;DRIVER'S LICENSE:                                           </xsl:text>
		<xsl:text>SOCIAL SECURITY NUMBER: </xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
						<xsl:with-param name="dataElem">DLN</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">SSN</xsl:with-param>
		</xsl:apply-templates>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;DATE OF BIRTH:                </xsl:text>
		<xsl:text>SEX  </xsl:text>
		<xsl:text>RACE </xsl:text>
		<xsl:text>EYE  </xsl:text>
		<xsl:text>HGT  </xsl:text>
		<xsl:text>WGT  </xsl:text>
		<xsl:text>HAIR </xsl:text>
		<xsl:text>EMPLOYER/SCHOOL:                        </xsl:text>
		<xsl:text>BUSINESS PHONE: </xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="30"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">DOB</xsl:with-param>
		</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="5"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">SEX</xsl:with-param>
		</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="5"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">RACE</xsl:with-param>
		</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="5"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">EYE</xsl:with-param>
		</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="5"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">HGT</xsl:with-param>
		</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="5"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">WGT</xsl:with-param>
		</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="5"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">HAIR</xsl:with-param>
		</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="40"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">EMP</xsl:with-param>
		</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">BUSPHONE</xsl:with-param>
		</xsl:apply-templates>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;                                                            BUSINESS/SCHOOL ADDRESS: </xsl:text>
		<xsl:text>&#10;                                                            </xsl:text>
		<xsl:apply-templates select="./nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">BUSADDR</xsl:with-param>
		</xsl:apply-templates>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
	</xsl:template>	
	
	<xsl:template match="*/nc:RoleOfPersonReference">
		<xsl:param name="dataElem"/>
		<xsl:variable name="PersonRef">
			<xsl:value-of select="@s:ref"/>
		</xsl:variable>
			
		<xsl:choose>
			<xsl:when test="$dataElem='NAME'">
				<xsl:value-of select="//*[@s:id=$PersonRef]/nc:PersonName/nc:PersonGivenName"/>
				<xsl:text> </xsl:text>
				<xsl:value-of select="//*[@s:id=$PersonRef]/nc:PersonName/nc:PersonMiddleName"/>
				<xsl:text> </xsl:text>
				<xsl:value-of select="//*[@s:id=$PersonRef]/nc:PersonName/nc:PersonSurName"/>
			</xsl:when>
			<xsl:when test="$dataElem='SID'">
				<xsl:value-of select="//*[@s:id=$PersonRef]/nc:PersonStateIdentification/nc:IdentificationID"/>
			</xsl:when>
			<xsl:when test="$dataElem='AGE'">
				<xsl:value-of select="//*[@s:id=$PersonRef]/nc:PersonAgeMeasure/nc:MeasurePointValue"/>
			</xsl:when>
			<xsl:when test="$dataElem='SIGNATURE'">
				<xsl:value-of select="//*[@s:id=$PersonRef]/nc:PersonDigitizedSignatureImage/nc:BinaryBase64Object"/>
			</xsl:when>
			<xsl:when test="$dataElem='DOB'">
				<xsl:call-template name="FormatDate">
					<xsl:with-param name="FullDate">
							<xsl:value-of select="//*[@s:id=$PersonRef]/nc:PersonBirthDate/nc:Date"/>
					</xsl:with-param>
				</xsl:call-template>
			</xsl:when>
			<xsl:when test="$dataElem='SSN'">
				<xsl:call-template name="FormatSSN">
					<xsl:with-param name="FullSSN">	
						<xsl:value-of select="//*[@s:id=$PersonRef]/nc:PersonSSNIdentification/nc:IdentificationID"/>
					</xsl:with-param>
				</xsl:call-template>
			</xsl:when>
			<xsl:when test="$dataElem='RACE'">
				<xsl:value-of select="//*[@s:id=$PersonRef]/nc:PersonRaceCode"/>
			</xsl:when>
			<xsl:when test="$dataElem='SEX'">
				<xsl:value-of select="//*[@s:id=$PersonRef]/nc:PersonSexCode"/>
			</xsl:when>
			<xsl:when test="$dataElem='HGT'">
				<xsl:value-of select="//*[@s:id=$PersonRef]/nc:PersonHeightMeasure"/>
			</xsl:when>
			<xsl:when test="$dataElem='WGT'">
				<xsl:value-of select="//*[@s:id=$PersonRef]/nc:PersonWeightMeasure"/>
			</xsl:when>
			<xsl:when test="$dataElem='EYE'">
				<xsl:value-of select="//*[@s:id=$PersonRef]/nc:PersonEyeColorCode"/>
			</xsl:when>
			<xsl:when test="$dataElem='HAIR'">
				<xsl:value-of select="//*[@s:id=$PersonRef]/nc:PersonHairColorCode"/>
			</xsl:when>
			<xsl:when test="$dataElem='DLN'">
				<xsl:value-of select="//*[@s:id=$PersonRef]/j:PersonAugmentation/nc:DriverLicense/nc:DriverLicenseIdentification/j:IdentificationJurisdictionNCICLISCode"/>
				<xsl:text> </xsl:text>
				<xsl:value-of select="//*[@s:id=$PersonRef]/j:PersonAugmentation/nc:DriverLicense/nc:DriverLicenseIdentification/nc:IdentificationID"/>
			</xsl:when>
			<xsl:when test="$dataElem='ADDRESS'">
				<xsl:apply-templates select="//nc:ResidenceAssociation">
					<xsl:with-param name="PersonID">
						<xsl:value-of select="$PersonRef"/>
					</xsl:with-param>
				</xsl:apply-templates>
			</xsl:when>

			<xsl:when test="$dataElem='PHONE'">
				<xsl:apply-templates select="//nc:PersonContactInformationAssociation">
					<xsl:with-param name="PersonID">
						<xsl:value-of select="$PersonRef"/>
					</xsl:with-param>
				</xsl:apply-templates>
			</xsl:when>
			<xsl:when test="$dataElem='EMP'">
				<xsl:apply-templates select="//tx:PersonCurrentEmploymentAssociation">
					<xsl:with-param name="PersonID">
						<xsl:value-of select="$PersonRef"/>
					</xsl:with-param>
				</xsl:apply-templates>
		</xsl:when>
			<xsl:when test="$dataElem='BUSADDR'">
				<xsl:apply-templates select="//tx:PersonCurrentEmploymentAssociation">
					<xsl:with-param name="PersonID">
						<xsl:value-of select="$PersonRef"/>
					</xsl:with-param>
					<xsl:with-param name="dataElem">ADDRESS</xsl:with-param>
				</xsl:apply-templates>
			</xsl:when>
			
			<xsl:when test="$dataElem='BUSPHONE'">
				<xsl:apply-templates select="//tx:PersonCurrentEmploymentAssociation">
					<xsl:with-param name="PersonID">
						<xsl:value-of select="$PersonRef"/>
					</xsl:with-param>
					<xsl:with-param name="dataElem">PHONE</xsl:with-param>
				</xsl:apply-templates>
			</xsl:when>
			
		</xsl:choose>
	</xsl:template>
				
		
	<xsl:template match="tx:Property">
		<xsl:param name="VictimID"/>
		<xsl:variable name="PersonRef">
			<xsl:value-of select="./tx:IncidentVictimReference/@s:ref"/>
		</xsl:variable>
			
		<xsl:if test="$VictimID=$PersonRef">
			<xsl:variable name="ItemRef">
				<xsl:value-of select="./nc:RoleOfItemReference/@s:ref"/>
			</xsl:variable>
			<xsl:apply-templates select="//nc:TangibleItem">
				<xsl:with-param name="ItemID"><xsl:value-of select="$ItemRef"/></xsl:with-param>
			</xsl:apply-templates>
		</xsl:if>
	</xsl:template>
	
	<xsl:template match="nc:TangibleItem">
		<xsl:param name="ItemID"/>
		<xsl:if test="@s:id=$ItemID">
			<xsl:text>&#10;Item Name:</xsl:text>
			<xsl:value-of select="//nc:TangibleItem[@s:id=$ItemID]/nc:ItemName"/>
			<xsl:text>&#10;Item Serial #</xsl:text>
			<xsl:value-of select="//nc:TangibleItem[@s:id=$ItemID]/nc:ItemSerialIdentification/nc:IdentificationID"/>
			<xsl:text>&#10;Item Value: $</xsl:text>
			<xsl:value-of select="//nc:TangibleItem[@s:id=$ItemID]/nc:ItemValue/nc:ItemValueAmount"/>
		</xsl:if>
		
	</xsl:template>
	
</xsl:stylesheet>

